from django.core.mail import send_mail

from oabanck import celery_app, settings


@celery_app.task(name='send_mail_task')
def send_mail_task(email_list,subject,message):
    ## 异步任务 。。。
    print(f"要发送的信息是 {email_list} subject is {subject} message is {message}")
    send_mail(subject, recipient_list=email_list, message=message,
              from_email=settings.EMAIL_HOST_USER)

